package com.zjdiepu.www.model.yw.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;

import com.zjdiepu.www.base.core.BaseModel;

/**
 * 车辆信息<br/>
 * 
 * @author xiongxiaotun<br/>
 * @time 2017年05月09日 19时42分<br/>
 * @since 1.0<br/>
 */
@ApiModel(value = "YwBusinessCar", description = "车辆信息", parent = BaseModel.class)
public class YwBusinessCar extends BaseModel {

	private static final long serialVersionUID = 1L;
	
	/**
	 * @author xiongxiaotun <br/>
	 * @Title: isCompleted <br/>
	 * @Description: 是否完成资料录入 <br/>
	 * @return
	 * @version V1.0 <br/>
	 */
	public boolean isCompleted() {
		if (!StringUtils.isNoneBlank(busiId, cusId, carType, carPlace,
				registrationArea, licencePlateType, carOwnersName,
				carBrand, carSeries, carModel,
				nameCarBrand, nameCarSeries, nameCarModel)) {// 不含空
			return false;
		}

		if (!ObjectUtils.allNotNull(seatNum, price)) {
			return false;
		}

		if ("02".equals(carType)) { // 购车人
			if (!StringUtils.isNoneBlank(carStatus, carPurpose, evaluateProvince, evaluateCity, vin)) {// 不含空
				return false;
			}
			if (!ObjectUtils.allNotNull(startYear, mileage)) {
				return false;
			}
		}
		return true;
	}

	/**
	 * 业务ID
	 */
	@ApiModelProperty(name = "busiId", required = false, value = "业务ID", example = "业务ID")
	private String busiId;

	/**
	 * 客户ID
	 */
	@ApiModelProperty(name = "cusId", required = false, value = "客户ID", example = "客户ID")
	private String cusId;

	/**
	 * 车品牌
	 */
	@ApiModelProperty(name = "carBrand", required = false, value = "车品牌", example = "车品牌")
	private String carBrand;

	/**
	 * 车系
	 */
	@ApiModelProperty(name = "carSeries", required = false, value = "车系", example = "车系")
	private String carSeries;

	/**
	 * 车型
	 */
	@ApiModelProperty(name = "carModel", required = false, value = "车型", example = "车型")
	private String carModel;

	/**
	 * 品牌名称
	 */
	@ApiModelProperty(name = "nameCarBrand", required = false, value = "品牌名称", example = "品牌名称")
	private String nameCarBrand;

	/**
	 * 车品牌
	 */
	@ApiModelProperty(name = "nameCarSeries", required = false, value = "车系名称", example = "车系名称")
	private String nameCarSeries;
	/**
	 * 车辆名称
	 */
	@ApiModelProperty(name = "nameCarModel", required = false, value = "车辆名称", example = "车辆名称")
	private String nameCarModel;
	
	/**
	 * 新车指导价
	 */
	@ApiModelProperty(name = "priceNewcar", required = false, value = "新车指导价", example = "新车指导价")
	private String priceNewcar;
	
	/**
	 * 公告型号
	 */
	@ApiModelProperty(name = "noticeModel", required = false, value = "公告型号", example = "公告型号")
	private String noticeModel;

	/**
	 * 车辆性质
	 */
	@ApiModelProperty(name = "carType", required = false, value = "车辆性质", example = "车辆性质")
	private String carType;

	/**
	 * 原产地
	 */
	@ApiModelProperty(name = "carPlace", required = false, value = "原产地", example = "原产地")
	private String carPlace;

	/**
	 * 座位数
	 */
	@ApiModelProperty(name = "seatNum", required = false, value = "座位数", example = "0")
	private Integer seatNum;

	/**
	 * 上牌地
	 */
	@ApiModelProperty(name = "registrationArea", required = false, value = "上牌地", example = "上牌地")
	private String registrationArea;

	/**
	 * 上牌类型
	 */
	@ApiModelProperty(name = "licencePlateType", required = false, value = "上牌类型", example = "上牌类型")
	private String licencePlateType;

	/**
	 * 行驶证车主
	 */
	@ApiModelProperty(name = "carOwnersName", required = false, value = "行驶证车主", example = "行驶证车主")
	private String carOwnersName;

	/**
	 * 车架号
	 */
	@ApiModelProperty(name = "vin", required = false, value = "车架号", example = "车架号")
	private String vin;

	/**
	 * 行驶里程
	 */
	@ApiModelProperty(name = "mileage", required = false, value = "行驶里程", example = "0")
	private Double mileage;

	/**
	 * 启用日期
	 */
	@ApiModelProperty(name = "startDate", required = false, value = "启用日期", example = "2017-06-29")
	private Date startDate;

	/**
	 * 启用年份
	 */
	@ApiModelProperty(name = "startYear", required = false, value = "启用年份", example = "0")
	private Integer startYear;

	/**
	 * 启用月份
	 */
	@ApiModelProperty(name = "startMonth", required = false, value = "启用月份", example = "0")
	private Integer startMonth;

	/**
	 * 车况
	 */
	@ApiModelProperty(name = "carStatus", required = false, value = "车况", example = "车况")
	private String carStatus;

	/**
	 * 用途
	 */
	@ApiModelProperty(name = "carPurpose", required = false, value = "用途", example = "用途")
	private String carPurpose;

	/**
	 * 估价省份
	 */
	@ApiModelProperty(name = "evaluateProvince", required = false, value = "估价省份", example = "估价省份")
	private String evaluateProvince;

	/**
	 * 估价城市
	 */
	@ApiModelProperty(name = "evaluateCity", required = false, value = "估价城市", example = "估价城市")
	private String evaluateCity;

	/**
	 * 二手车估价
	 */
	@ApiModelProperty(name = "evaluatePrice", required = false, value = "二手车估价", example = "0")
	private Double evaluatePrice;

	/**
	 * 购买价
	 */
	@ApiModelProperty(name = "price", required = false, value = "购买价", example = "0")
	private Double price;

	/**
	 * 车辆类别
	 */
	@ApiModelProperty(name = "categoryCar", required = false, value = "车辆类别", example = "车辆类别")
	private String categoryCar;

	/**
	 * 车辆颜色
	 */
	@ApiModelProperty(name = "colorCar", required = false, value = "车辆颜色", example = "车辆颜色")
	private String colorCar;

	/**
	 * 合格证号
	 */
	@ApiModelProperty(name = "numQualified", required = false, value = "合格证号", example = "合格证号")
	private String numQualified;

	/**
	 * 排量
	 */
	@ApiModelProperty(name = "displacement", required = false, value = "排量", example = "排量")
	private String displacement;

	/**
	 * 功率
	 */
	@ApiModelProperty(name = "power", required = false, value = "功率", example = "功率")
	private String power;

	/**
	 * 发动机号
	 */
	@ApiModelProperty(name = "numEngine", required = false, value = "发动机号", example = "发动机号")
	private String numEngine;

	/**
	 * 底盘后6位
	 */
	@ApiModelProperty(name = "numChassisSix", required = false, value = "底盘后6位", example = "底盘后6位")
	private String numChassisSix;

	/**
	 * 发票日期
	 */
	@ApiModelProperty(name = "dateBill", required = false, value = "发票日期", example = "2017-04-23 14:22:43")
	private Date dateBill;

	/**
	 * 开票单位
	 */
	@ApiModelProperty(name = "companyBill", required = false, value = "开票单位", example = "开票单位")
	private String companyBill;

	/**
	 * 发票号
	 */
	@ApiModelProperty(name = "numBill", required = false, value = "发票号", example = "发票号")
	private String numBill;

	/**
	 * 发票地区
	 */
	@ApiModelProperty(name = "areaBill", required = false, value = "发票地区", example = "发票地区")
	private String areaBill;

	// =========================辅助字段=========================
	
	/**
	 * 信息是否完整1:信息完整；0：信息不完整
	 */
	@ApiModelProperty(name = "isCompleted", required = false, value = "信息是否完整1:信息完整；0：信息不完整", example = "0")
	private Integer isCompleted;

	/**
	 * 车辆性质显示
	 */
	@ApiModelProperty(name = "carTypeDisplay", required = false, value = "车辆性质显示", example = "车辆性质显示")
	private String carTypeDisplay;

	/**
	 * 原产地显示
	 */
	@ApiModelProperty(name = "carPlaceDisplay", required = false, value = "原产地显示", example = "原产地显示")
	private String carPlaceDisplay;

	/**
	 * 上牌类型显示
	 */
	@ApiModelProperty(name = "licencePlateTypeDisplay", required = false, value = "上牌类型显示", example = "上牌类型显示")
	private String licencePlateTypeDisplay;
	/**
	 * 车况显示
	 */
	@ApiModelProperty(name = "carStatusDisplay", required = false, value = "上牌类型显示", example = "车况显示")
	private String carStatusDisplay;
	/**
	 * 车辆用途显示
	 */
	@ApiModelProperty(name = "carPurposeDisplay", required = false, value = "车辆用途显示", example = "车辆用途显示")
	private String carPurposeDisplay;

	/**
	 * 车辆类别显示
	 */
	@ApiModelProperty(name = "categoryCarDisplay", required = false, value = "车辆类别显示", example = "车辆类别显示")
	private String categoryCarDisplay;

	/**
	 * 车辆颜色显示
	 */
	@ApiModelProperty(name = "colorCarDisplay", required = false, value = "车辆颜色显示", example = "车辆颜色显示")
	private String colorCarDisplay;

	/**
	 * 估价省份
	 */
	@ApiModelProperty(name = "evaluateProvinceDisplay", required = false, value = "估价省份", example = "估价省份")
	private String evaluateProvinceDisplay;

	/**
	 * 估价城市
	 */
	@ApiModelProperty(name = "evaluateCityDisplay", required = false, value = "估价城市", example = "估价城市")
	private String evaluateCityDisplay;
	/**
	 * 购买价
	 */
	@ApiModelProperty(name = "priceString", required = false, value = "购买价", example = "0")
	private String priceString;

	// ======================提车信息===========================
	/**
	 * 提车记录ID
	 */
	@ApiModelProperty(name = "pickCarId", required = false, value = "提车记录ID", example = "提车记录ID")
	private String pickCarId;

	/**
	 * 提车时间
	 */
	@ApiModelProperty(name = "pickCarTime", required = false, value = "提车时间", example = "2017-04-23 14:22:43")
	private Date pickCarTime;

	public final String getNameCarBrand() {
		return nameCarBrand;
	}

	public final void setNameCarBrand(String nameCarBrand) {
		this.nameCarBrand = nameCarBrand;
	}

	public final String getNameCarSeries() {
		return nameCarSeries;
	}

	public final void setNameCarSeries(String nameCarSeries) {
		this.nameCarSeries = nameCarSeries;
	}
	

	public String getPriceNewcar() {
		return priceNewcar;
	}

	public void setPriceNewcar(String priceNewcar) {
		this.priceNewcar = priceNewcar;
	}

	public final String getEvaluateProvinceDisplay() {
		return evaluateProvinceDisplay;
	}

	public final void setEvaluateProvinceDisplay(String evaluateProvinceDisplay) {
		this.evaluateProvinceDisplay = evaluateProvinceDisplay;
	}

	public final String getEvaluateCityDisplay() {
		return evaluateCityDisplay;
	}

	public final void setEvaluateCityDisplay(String evaluateCityDisplay) {
		this.evaluateCityDisplay = evaluateCityDisplay;
	}

	public String getCategoryCarDisplay() {
		return categoryCarDisplay;
	}

	public void setCategoryCarDisplay(String categoryCarDisplay) {
		this.categoryCarDisplay = categoryCarDisplay;
	}

	public String getColorCarDisplay() {
		return colorCarDisplay;
	}

	public void setColorCarDisplay(String colorCarDisplay) {
		this.colorCarDisplay = colorCarDisplay;
	}

	public String getBusiId() {
		return this.busiId;
	}

	public void setBusiId(String busiId) {
		this.busiId = busiId;
	}

	public String getCusId() {
		return this.cusId;
	}

	public void setCusId(String cusId) {
		this.cusId = cusId;
	}

	public String getCarBrand() {
		return this.carBrand;
	}

	public void setCarBrand(String carBrand) {
		this.carBrand = carBrand;
	}

	public String getCarSeries() {
		return this.carSeries;
	}

	public void setCarSeries(String carSeries) {
		this.carSeries = carSeries;
	}

	public String getCarModel() {
		return this.carModel;
	}

	public void setCarModel(String carModel) {
		this.carModel = carModel;
	}

	public String getNameCarModel() {
		return this.nameCarModel;
	}

	public void setNameCarModel(String nameCarModel) {
		this.nameCarModel = nameCarModel;
	}

	public String getCarType() {
		return this.carType;
	}

	public void setCarType(String carType) {
		this.carType = carType;
	}

	public String getCarPlace() {
		return this.carPlace;
	}

	public void setCarPlace(String carPlace) {
		this.carPlace = carPlace;
	}

	public Integer getSeatNum() {
		return this.seatNum;
	}

	public void setSeatNum(Integer seatNum) {
		this.seatNum = seatNum;
	}

	public String getRegistrationArea() {
		return this.registrationArea;
	}

	public void setRegistrationArea(String registrationArea) {
		this.registrationArea = registrationArea;
	}

	public String getLicencePlateType() {
		return this.licencePlateType;
	}

	public void setLicencePlateType(String licencePlateType) {
		this.licencePlateType = licencePlateType;
	}

	public String getCarOwnersName() {
		return this.carOwnersName;
	}

	public void setCarOwnersName(String carOwnersName) {
		this.carOwnersName = carOwnersName;
	}

	public String getVin() {
		return this.vin;
	}

	public void setVin(String vin) {
		this.vin = vin;
	}

	public Double getMileage() {
		return this.mileage;
	}

	public void setMileage(Double mileage) {
		this.mileage = mileage;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Integer getStartYear() {
		return this.startYear;
	}

	public void setStartYear(Integer startYear) {
		this.startYear = startYear;
	}

	public Integer getStartMonth() {
		return this.startMonth;
	}

	public void setStartMonth(Integer startMonth) {
		this.startMonth = startMonth;
	}

	public String getCarStatus() {
		return this.carStatus;
	}

	public void setCarStatus(String carStatus) {
		this.carStatus = carStatus;
	}

	public String getCarPurpose() {
		return this.carPurpose;
	}

	public void setCarPurpose(String carPurpose) {
		this.carPurpose = carPurpose;
	}

	public String getEvaluateProvince() {
		return this.evaluateProvince;
	}

	public void setEvaluateProvince(String evaluateProvince) {
		this.evaluateProvince = evaluateProvince;
	}

	public String getEvaluateCity() {
		return this.evaluateCity;
	}

	public void setEvaluateCity(String evaluateCity) {
		this.evaluateCity = evaluateCity;
	}

	public Double getEvaluatePrice() {
		return this.evaluatePrice;
	}

	public void setEvaluatePrice(Double evaluatePrice) {
		this.evaluatePrice = evaluatePrice;
	}

	public Double getPrice() {
		return this.price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getCategoryCar() {
		return this.categoryCar;
	}

	public void setCategoryCar(String categoryCar) {
		this.categoryCar = categoryCar;
	}

	public String getColorCar() {
		return this.colorCar;
	}

	public void setColorCar(String colorCar) {
		this.colorCar = colorCar;
	}

	public String getNumQualified() {
		return this.numQualified;
	}

	public void setNumQualified(String numQualified) {
		this.numQualified = numQualified;
	}

	public String getDisplacement() {
		return this.displacement;
	}

	public void setDisplacement(String displacement) {
		this.displacement = displacement;
	}

	public String getPower() {
		return this.power;
	}

	public void setPower(String power) {
		this.power = power;
	}

	public String getNumEngine() {
		return this.numEngine;
	}

	public void setNumEngine(String numEngine) {
		this.numEngine = numEngine;
	}

	public String getNumChassisSix() {
		return this.numChassisSix;
	}

	public void setNumChassisSix(String numChassisSix) {
		this.numChassisSix = numChassisSix;
	}

	public Date getDateBill() {
		return this.dateBill;
	}

	public void setDateBill(Date dateBill) {
		this.dateBill = dateBill;
	}

	public String getCompanyBill() {
		return this.companyBill;
	}

	public void setCompanyBill(String companyBill) {
		this.companyBill = companyBill;
	}

	public String getNumBill() {
		return this.numBill;
	}

	public void setNumBill(String numBill) {
		this.numBill = numBill;
	}

	public String getAreaBill() {
		return this.areaBill;
	}

	public void setAreaBill(String areaBill) {
		this.areaBill = areaBill;
	}

	public Integer getIsCompleted() {
		return this.isCompleted;
	}

	public void setIsCompleted(Integer isCompleted) {
		this.isCompleted = isCompleted;
	}

	public String getCarTypeDisplay() {
		return carTypeDisplay;
	}

	public void setCarTypeDisplay(String carTypeDisplay) {
		this.carTypeDisplay = carTypeDisplay;
	}

	public String getCarPlaceDisplay() {
		return carPlaceDisplay;
	}

	public void setCarPlaceDisplay(String carPlaceDisplay) {
		this.carPlaceDisplay = carPlaceDisplay;
	}

	public String getLicencePlateTypeDisplay() {
		return licencePlateTypeDisplay;
	}

	public void setLicencePlateTypeDisplay(String licencePlateTypeDisplay) {
		this.licencePlateTypeDisplay = licencePlateTypeDisplay;
	}

	public String getCarStatusDisplay() {
		return carStatusDisplay;
	}

	public void setCarStatusDisplay(String carStatusDisplay) {
		this.carStatusDisplay = carStatusDisplay;
	}

	public String getCarPurposeDisplay() {
		return carPurposeDisplay;
	}

	public void setCarPurposeDisplay(String carPurposeDisplay) {
		this.carPurposeDisplay = carPurposeDisplay;
	}

	public String getPickCarId() {
		return pickCarId;
	}

	public void setPickCarId(String pickCarId) {
		this.pickCarId = pickCarId;
	}

	public Date getPickCarTime() {
		return pickCarTime;
	}

	public void setPickCarTime(Date pickCarTime) {
		this.pickCarTime = pickCarTime;
	}
	
	public String getNoticeModel() {
		return noticeModel;
	}

	public void setNoticeModel(String noticeModel) {
		this.noticeModel = noticeModel;
	}

	public String getPriceString() {
		return priceString;
	}

	public void setPriceString(String priceString) {
		this.priceString = priceString;
	}

	@Override
	public String toString() {
		return super.toString() + "YwBusinessCar [busiId = " + busiId
				+ ", cusId = " + cusId + ", carBrand = " + carBrand
				+ ", carSeries = " + carSeries + ", carModel = " + carModel
				+ ", " + "nameCarModel = " + nameCarModel + ", carType = "
				+ carType + ", carPlace = " + carPlace + ", seatNum = "
				+ seatNum + ", registrationArea = " + registrationArea + ", "
				+ "licencePlateType = " + licencePlateType
				+ ", carOwnersName = " + carOwnersName + ", vin = " + vin
				+ ", mileage = " + mileage + ", startYear = " + startYear
				+ ", " + "startMonth = " + startMonth + ", carStatus = "
				+ carStatus + ", carPurpose = " + carPurpose
				+ ", evaluateProvince = " + evaluateProvince
				+ ", evaluateCity = " + evaluateCity + ", "
				+ "evaluatePrice = " + evaluatePrice + ", price = " + price
				+ ", categoryCar = " + categoryCar + ", colorCar = " + colorCar
				+ ", numQualified = " + numQualified + ", " + "displacement = "
				+ displacement + ", power = " + power + ", numEngine = "
				+ numEngine + ", numChassisSix = " + numChassisSix
				+ ", dateBill = " + dateBill + ", " + "companyBill = "
				+ companyBill + ", numBill = " + numBill + ", areaBill = "
				+ areaBill + ", isCompleted = " + isCompleted + "]";
	}

}